//
// Created by wze-zero on 2024/9/14 014.
//
#include <iostream>

using namespace std;

int main() {
    int num;
    string s;
    cin >> num;
    while (num != 0) {
        s += to_string(num % 10);
        num /= 10;
    }
    cout << s << endl;
    return 0;
}